xen: add assertion in default_vcpu0_location to protect against broken masks
authorIan Campbell <ian.campbell@citrix.com>
Tue, 3 Jul 2012 09:52:33 +0000 (10:52 +0100)
committerIan Campbell <ian.campbell@citrix.com>
Tue, 3 Jul 2012 09:52:33 +0000 (10:52 +0100)
commit5dd2cbfba50238b262b3b6712cff6ce16d8fb95d
tree0bba430f8427e3de68b8f15f8349e76f9e7d761b
parent52c18e15d53f95861591c973413c020528c681bb
xen: add assertion in default_vcpu0_location to protect against broken masks

When setting up the cpu sibling/etc masks on ARM I accidentally and
incorrectly omitted a CPU from it's own sibling mask which caused this
function to return an invalid cpu number which caused errors later when we
tried to access per_cpu data for that invalid cpu.

Add an assert to catch this in the future.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Keir Fraser <keir@xen.org>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
xen/common/domctl.c